import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/layout.vue'
import News from '@/views/second/news.vue'
import List from '@/views/second/list.vue'
import Profile from '@/views/second/profile.vue'
import Detail from '@/views/detail.vue'
import ShouYe from '@/views/second/shouye'
import Login from '@/views/login'
import Favorate from '@/views/favorate'
import Rent from '@/views/rent'
import City from '@/views/city'
import GoShing from '@/views/goshoping'
import Map from '@/views/map'
Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/home/shouye'
    },
    {
      path: '/home',
      component: Home,
      children: [
        {
          path: 'list',
          component: List
        },
        {
          path: 'news',
          component: News
        },
        {
          path: 'profile',
          component: Profile
        },
        {
          path: 'shouye',
          component: ShouYe
        }
      ]
    },
    {
      path: '/detail',
      component: Detail
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/favorate',
      component: Favorate
    },
    {
      path: '/rent',
      component: Rent
    },
    {
      path: '/city',
      component: City
    },
    {
      path: '/goshoping',
      component: GoShing
    },
    {
      path: '/map',
      component: Map
    }
  ]
})
export default router
